1. Field of the Invention
This invention pertains generally to video processing, and more particularly to a method of performing rapid motion vector prediction using horizontal and vertical categorization.
2. Description of the Background Art
Video bit streams are conventionally processed within macroblocks that contain a luminance component and spatially associated chrominance components. A common video macroblock structure is that of a conventional 4:2:0 having a total of 6 blocks, shown numbered one through six. The 4:2:0 structure holds 4Y, 1 Cb, and 1 Cr block, with a block order as depicted within FIG. 1.
An inter-coded macroblock comprises either one motion vector for the complete macroblock or K motion vectors, wherein (1<K≦4). One motion vector is associated with each 8×8 block forming the 16×16 macroblocks. Each macroblock may be encoded as an INTRA or an INTER coded macroblock. The coding of an INTRA coded macroblock only utilizes information from that particular macroblock. By contrast, an INTER coded macroblock utilizes information from both itself and from the reference video-object plane (VOP). The information for the reference video-object plane is obtained through motion compensation. A two-dimensional vector is utilized for motion compensation of the macroblocks, which provides an offset from the coordinate position within the current picture to the coordinates within a reference video-object plane.
In decoding a motion vector MV=(MVx, MVy) of a macroblock, the differential motion vector MVD=(MVDx, MVDy) is extracted from the bit-stream by utilizing variable length decoding, whereupon it is added to a motion vector predictor, such as given by P=(Px, Py), on a component-by-component basis to form the final motion vector. It will be appreciated, therefore, that the horizontal and vertical motion vector components are decoded differentially by using a prediction, such as may be formed by median filtering of three vector candidate predictors (MV1, MV2, MV3) from the spatial neighborhood comprising the blocks and macroblocks which have already been decoded. FIG. 2 through FIG. 5 depict four possible spatial positions of candidate predictors (MV1, MV2, MV3) for each macroblock.
The following set of four decision-rules are applied to obtain the value of the three candidate predictors:                1. If a candidate predictor MVi is in a transparent spatial neighborhood macroblock, or in a transparent block of the current macroblock, it is not valid; otherwise, it is set to the corresponding block vector.        2. If one and only one candidate predictor is not valid, then it is set to zero.        3. If two and only two candidate predictors are not valid, then they are set to the third candidate predictor.        4. If all three candidate predictors are not valid, then they are all set to zero.The median value of the three candidates for the same component is computed as a predictor, denoted by Px and Py, as given by:Px=Median (MV1x,MV2x,MV3x)Py=Median (MV1y,MV2y,MV3y)By way of example, if MV1=(−2, 3), MV2=(1, 5), and MV3=(−1, 7), then Px=−1 and Py=5.        
The conventional process by which the motion vectors are obtained is complicated by the fact that every condition described in the previous section must be evaluated. It will be appreciated, therefore, that a large number of decision rules are currently required that must be supported in hardware and software when encoding or decoding motion vectors.
Therefore, a need exists for a method of rapidly predicting motion vectors which are subject to a reduced number of rules and whose implementation is subject to less overhead than required by conventional methodology. The present invention satisfies those needs, as well as others, and overcomes the deficiencies of previously developed prediction methods.